Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Graphics Data Management

This section describes functions for managing graphics data. These functions apply to all derived media handler components.

MediaGetDrawingRgn

The MediaGetDrawingRgn function allows your derived media handler component to specify a portion of the screen that must be redrawn. This region is defined in the movie's display coordinate system.

pascal ComponentResult MediaGetDrawingRgn (
                     MediaHandler mh,
                     RgnHandle *partialRgn);
mh
Identifies the Movie Toolbox's connection to your derived media handler.

partialRgn
Points to a handle that defines the screen region to be redrawn. Note that your component is responsible for disposing of this region once drawing is complete. Since the base media handler will use this region during redrawing, it is best to dispose of it when your component is closed.

DISCUSSION

The Movie Toolbox calls this function in order to determine what part of the screen needs to be redrawn. By default, thetoolbox redraws the entire region that belongs to your component. If your component determines that only a portion of the screen has changed, and has indicated this to thetoolbox by setting the mPartialDraw flag to 1 in the flagsOut parameter of the MediaIdle function, the toolbox calls your component's MediaGetDrawingRgn function. Your component returns a region that defines the changed portion of the track's display region.

RESULT CODES

badComponentSelector
0x80008002 Function not supported

Memory Manager errors

MediaGetGraphicsMode

The MediaGetGraphicsMode function allows you to obtain the graphics mode and blend color values currently in use by any media handler.

pascal ComponentResult MediaGetGraphicsMode (
                     MediaHandler mh,
                     long *mode,
                     RGBColor *opColor);
mh
Identifies the Movie Toolbox's connection to your derived media handler.

mode
Contains a pointer to a long integer. The media handler returns the graphics mode currently in use by the media handler. This is a QuickDraw transfer mode value.

opColor
Contains a pointer to an RGB color structure. The toolbox returns the color currently in use by the media handler. This is the blend value for blends and the transparent color for transparent operations. The toolbox supplies this value to QuickDraw when you draw in addPin, subPin, blend, transparent, or graphicsModeStraightAlphaBlend mode.

RESULT CODES

Component Manager errors, as documented in Mac OS For QuickTime Programmers.

SEE ALSO

You can set the graphics mode and blend color of any media handler by calling the MediaSetGraphicsMode function, described below.

MediaSetGraphicsMode

The MediaSetGraphicsMode function allows you to set the graphics mode and blend color of any media handler.

pascal ComponentResult MediaSetGraphicsMode (
                     MediaHandler mh,
                     long mode,
                     const RGBColor *opColor);
mh
Identifies the Movie Toolbox's connection to your derived media handler.

mode
Specifies the graphics mode of the media handler. This is a QuickDraw transfer mode value.

opColor
Contains a pointer to the color for use in blending and transparent operations. The media handler passes this color to QuickDraw as appropriate when you draw in addPin, subPin, blend, transparent, or graphicsModeStraightAlphaBlend mode.

RESULT CODES

Component Manager errors, as documented in Mac OS For QuickTime Programmers.

SEE ALSO

You can retrieve the graphics mode and blend color currently in use by any media handler by calling the MediaGetGraphicsMode function, described above.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |